<?php echo $this->fetch('header.html'); ?>
<?php echo $this->_var['build_editor']; ?>
<script type="text/javascript" src="<?php echo $this->res_base . "/" . 'inline_edit.js'; ?>"></script>
<script language="javascript">
$(function(){
    $('#endtime,#starttime').datepicker({dateFormat: 'yy-mm-dd'});
});
</script>
<div id="rightTop">
    <p>专题页面</p>
    <ul class="subnav">
        <li><a class="btn3" href="index.php?module=specialpage">管理专题页面</a></li>
        <li><?php if ($this->_var['specialpage']['spec_id']): ?><a class="btn3" href="index.php?module=specialpage&amp;act=add">添加专题页面</a><?php else: ?><span>添加专题页面</span><?php endif; ?></li>
    </ul>
</div>

<div class="info">
    <form method="post" enctype="multipart/form-data">
            <table class="infoTable">
            <tr>
                <th class="paddingT15">
                  专题名称:</th>
                <td class="paddingT15 wordSpacing5">
                    <input style="width:350px;" id="name" type="text" name="name" value="<?php echo htmlspecialchars($this->_var['specialpage']['name']); ?>" />
                    <span class="field_notice">(专题名称不能为空,1-255个字符)</span>
              </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    开始时间:</th>
                <td class="paddingT15 wordSpacing5">
                    <input class="infoTableInput2" id="starttime" type="text" name="starttime" value="<?php echo local_date("Y-m-d",$this->_var['specialpage']['starttime']); ?>" />
                    <span class="field_notice">(为保证筹备时间充裕，最好将开始时间延后几天)</span>
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    结束时间:</th>
                <td class="paddingT15 wordSpacing5">
                    <input class="infoTableInput2" id="endtime" type="text" name="endtime" value="<?php echo local_date("Y-m-d",$this->_var['specialpage']['endtime']); ?>" />
                    <span class="field_notice">(结束时间不能早于开始时间)</span>
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    限制店铺等级:</th>
                <td class="paddingT15 wordSpacing5">
                <?php echo $this->html_checkbox(array('name'=>'sgrades[]','options'=>$this->_var['sgrades'],'checked'=>$this->_var['specialpage']['sgrades'])); ?>
                <span class="field_notice">(不选择则所有店铺都可以参加)</span>
                </td>
            </tr>

            <tr>
                <th class="paddingT15">
                    海报:</th>
                <td class="paddingT15 wordSpacing5">
                    <textarea class="infoTableInput2" style="width:99%; height:400px; " id="posters" type="text" name="posters"><?php echo htmlspecialchars($this->_var['specialpage']['posters']); ?></textarea>
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    专题分类:</th>
                <td class="paddingT15 wordSpacing5">
                <textarea name="category"><?php echo $this->_var['specialpage']['category']; ?></textarea>
                <span class="field_notice">(每行一个分类)</span>
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    专题简介:</th>
                <td class="paddingT15 wordSpacing5">
                <textarea name="description"><?php echo htmlspecialchars($this->_var['specialpage']['description']); ?></textarea>
                <span class="field_notice">(在店主提交的商品页面显示)</span></td>
            </tr>            
           <tr>
            <th></th>
            <td class="ptb20">
                <input class="formbtn" type="submit" name="Submit" value="提交" />
                <input class="formbtn" type="reset" name="Submit2" value="重置" />
            </td>
        </tr>
        </table>
    </form>
</div>
<?php echo $this->fetch('footer.html'); ?>
